<% title_tag t(".Collaborators"), @repository.name %>

<%= render "menu" %>
<div class="col-12 col-md-9 float-left">
  <div class="box">
    <h1 class="title">
      <p><%= t(".Collaborators") %></p>
      <div class="text-gray f5">
        <%= t(".Push access to the repository") %>
      </div>
    </h1>
    <ul id="repository-members" class="table-list members mb-4">
      <% @members.each do |member| %>
        <%= render "member", member: member %>
      <% end %>
    </ul>
    <div class="box-footer">
      <%= form_with(model: Member.new, url: collaborators_user_repository_settings_path(@repository.user, @repository), method: :post, class: "add-repository-member") do |form| %>
        <div class="f5"><%= t(".Search by username, full name or email address") %></div>
        <p class="text-gray-light f6 mb-3"><%= raw t(".By default, will add user as :role role", role: Member.role_name("editor")) %></p>
        <div class="input-group input-button-group">
          <%= render partial: "shared/autocomplete_users", locals: { input_name: "member[user_slug]" } %>
          <button type="submit" class="btn"><%= t(".Add") %></button>
        </div>
      <% end %>
    </div>
  </div>
</div>